export const setting: {
  options: FormTemplatesOptions;
} = {
  options: {
    api: {
      label: "API设置",
      key: "api",
      template: {
        preForm: {
          label: "预设设置",
          prop: "preForm",
          type: "preForm",
          value: "",
          options: [],
        },
        preTemplate: {
          label: "预设",
          prop: "preTemplate",
          type: "select",
          options: [],
          value: null,
        },
        apiType: {
          label: "API",
          prop: "apiType",
          type: "select",
          options: [
            {
              label: "OpenAI",
              value: "OpenAI",
            },
            {
              label: "Claude",
              value: "Claude",
            },
          ],
          value: "OpenAI",
        },
        apiUrl: {
          label: "API地址",
          prop: "apiUrl",
          type: "input",
          value: null,
          required: true,
        },
        Authorization: {
          label: "秘钥",
          prop: "Authorization",
          type: "input",
          value: null,
          required: true,
        },
        modelName: {
          label: "模型选择",
          prop: "modelName",
          type: "select",
          value: null,
          required: true,
        },
        presence_penalty: {
          label: "Presence Penalty",
          prop: "presence_penalty",
          type: "slider",
          value: 0,
          min: -2,
          max: 2,
          step: 0.01,
        },
        stream: {
          label: "Stream Output",
          prop: "stream",
          type: "switch",
          value: true,
        },
        temperature: {
          label: "Temperature",
          prop: "temperature",
          type: "slider",
          value: 0,
          min: 0,
          max: 2,
          step: 0.01,
        },
        top_p: {
          label: "Top P",
          prop: "top_p",
          type: "slider",
          value: 0,
          min: 0,
          max: 1,
          step: 0.01,
        },
        frequency_penalty: {
          label: "Frequency Penalty",
          prop: "frequency_penalty",
          type: "slider",
          value: 0,
          min: -2,
          max: 2,
          step: 0.01,
        },
        max_tokens: {
          label: "Max Tokens",
          prop: "max_tokens",
          type: "slider",
          value: 0,
          max: 1000000,
        },
      },
      backups: {},
    },
    generate: {
      label: "生成设置",
      key: "generate",
      template: {
        setting: {
          label: "生成配置",
          prop: "setting",
          type: "json",
          value: [],
          max: 1,
          required: true,
        },
        isGenerate: {
          label: "启用生成配置",
          prop: "isGenerate",
          value: true,
          type: "switch",
        },
        preChatListPath: {
          label: "内置预设地址",
          prop: "preChatListPath",
          value: "",
          type: "folderPathInput",
        },
      },
      backups: {},
    },
    base: {
      label: "基础设置",
      key: "base",
      template: {
        username: {
          label: "用户名",
          prop: "username",
          type: "input",
          value: "",
        },
        systemHide: {
          label: "显示系统信息",
          prop: "systemHide",
          type: "switch",
          value: true,
        },
        avatar: {
          label: "用户头像",
          prop: "avatar",
          type: "image",
          value: [],
          max: 1,
        },        
        darkTheme: {
          label: "黑暗主题",
          prop: "darkTheme",
          type: "switch",
          value: true,
        },
      },
      backups: {},
    },
    "Gpt-SoVits": {
      label: "Gpt-SoVits设置",
      key: "Gpt-SoVits",
      template: {
        preForm: {
          label: "预设设置",
          prop: "preForm",
          type: "preForm",
          value: "",
          options: [],
        },
        sovitsModelPath: {
          label: "SoVITS模型路径",
          prop: "-s",
          type: "filePathInput",
          value: "SoVITS_weights\\Azuma_e35_s1435.pth",
          filters: [{ name: "所有文件", extensions: ["*"] }],
          required: true,
        },
        gptModelPath: {
          label: "GPT模型路径",
          prop: "-g",
          type: "filePathInput",
          value: "GPT_weights\\Azuma-e10.ckpt",
          filters: [{ name: "所有文件", extensions: ["*"] }],
          required: true,
        },
        defaultReferenceAudioPath: {
          label: "默认参考音频路径",
          prop: "-dr",
          type: "filePathInput",
          value: undefined,
          filters: [{ name: "所有文件", extensions: ["*"] }],
          required: true,
        },
        defaultReferenceAudioText: {
          label: "默认参考音频文本",
          prop: "-dt",
          type: "input",
          value: undefined,
          required: true,
        },
        defaultReferenceAudioLanguage: {
          label: "默认参考音频语种",
          prop: "-dl",
          type: "select",
          options: ["中文", "英文", "日文", "zh", "en", "ja"],
          value: "zh",
          required: true,
        },
        inferenceDevice: {
          label: "推理设备",
          prop: "-d",
          type: "select",
          options: ["cuda", "cpu", "mps"],
          value: "cuda",
        },
        bindAddress: {
          label: "绑定地址",
          prop: "-a",
          type: "input",
          value: "127.0.0.1", // Default value
          required: true,
        },
        // Remaining properties
        // Uncomment and add as needed
        // port: {
        //   label: "绑定端口",
        //   prop: "-p",
        //   type: "number",
        //   value: 9880, // Default value
        // },
        fullPrecision: {
          label: "覆盖 config.py 使用全精度",
          prop: "-fp",
          type: "switch",
          value: false, // Default value
        },
        halfPrecision: {
          label: "覆盖 config.py 使用半精度",
          prop: "-hp",
          type: "switch",
          value: false, // Default value
        },
        cnHubertPath: {
          label: "cnhubert路径",
          prop: "-hb",
          type: "filePathInput",
          value: undefined,
          filters: [{ name: "所有文件", extensions: ["*"] }],
        },
        bertPath: {
          label: "bert路径",
          prop: "-b",
          type: "filePathInput",
          value: undefined,
          filters: [{ name: "SoVITS模型路径", extensions: ["*"] }],
        },
      },
      backups: {},
    },
  },
};
